<template>
  <!-- <vue-seamless-scroll :class-option="classOption" style="height: 450px;overflow: hidden;"> -->
    <el-row :gutter="10" class="panel-group" style="height: 460px;overflow: hidden;">
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col">
        <div class="card-panel" @click="toRouterPath('/oms/orderDispatch/warehouse?type=0')">
          <div class="card-panel-icon-wrapper icon-message">
            <svg-icon icon-class="log" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              入库申请
            </div>
            <count-to :start-val="0" :end-val="datas.inums" style="margin-left: 20px;" :duration="3000" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col">
        <div class="card-panel" @click="toRouterPath('/oms/orderDispatch/warehouse?type=1')">
          <div class="card-panel-icon-wrapper icon-example">
            <svg-icon icon-class="log" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              出库申请
            </div>
            <count-to :start-val="0" :end-val="datas.onums" style="margin-left: 20px;" :duration="3600" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col">
        <div class="card-panel" @click="toRouterPath('/oms/orderDispatch/warehouse?type=3')">
          <div class="card-panel-icon-wrapper icon-tree">
            <svg-icon icon-class="time-range" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              调用申请
            </div>
            <count-to :start-val="0" :end-val="datas.tnums" style="margin-left: 20px;" :duration="3200" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col" >
        <div class="card-panel" @click="toRouterPath('/oms/repay')">
          <div class="card-panel-icon-wrapper icon-danger">
            <svg-icon icon-class="time-range" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              归还预警
            </div>
            <count-to :start-val="0" :end-val="datas.rnums" style="margin-left: 20px;" :duration="2600" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col">
        <div class="card-panel" @click="toRouterPath('/deal/deal?type=2')">
          <div class="card-panel-icon-wrapper icon-form">
            <svg-icon icon-class="excel" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              处置申请
            </div>
            <count-to :start-val="0" :end-val="datas.deals" style="margin-left: 20px;" :duration="3600" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col" >
        <div class="card-panel" @click="toRouterPath('/oms/registration')">
          <div class="card-panel-icon-wrapper icon-danger">
            <svg-icon icon-class="excel" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              处置登记预警
            </div>
            <count-to :start-val="0" :end-val="datas.cnums" style="margin-left: 50px;" :duration="2600" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col">
        <div class="card-panel" @click="toRouterPath('/wms/viewing')">
          <div class="card-panel-icon-wrapper icon-job">
            <svg-icon icon-class="skill" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              阅证申请
            </div>
            <count-to :start-val="0" :end-val="datas.vnums" style="margin-left: 20px;" :duration="3600" class="card-panel-num" />
          </div>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12" class="card-panel-col" >
        <div class="card-panel" @click="toRouterPath('/oms/warning')">
          <div class="card-panel-icon-wrapper icon-danger">
            <svg-icon icon-class="skill" class-name="card-panel-icon" />
          </div>
          <div class="card-panel-description">
            <div class="card-panel-text">
              移交预警
            </div>
            <count-to :start-val="0" :end-val="datas.snums" style="margin-left: 20px;" :duration="2600" class="card-panel-num" />
          </div>
        </div>
      </el-col>


    </el-row>
  <!-- </vue-seamless-scroll> -->
</template>

<script>
  import CountTo from 'vue-count-to'
  import vueSeamlessScroll from 'vue-seamless-scroll'
  export default {
    props:{
      datas:{
        type:Object
      }
    },
    components: {
      CountTo,
      vueSeamlessScroll
    },
    computed:{
      classOption() {
        return {
          step: 1, // 数值越大速度滚动越快
          limitMoveNum: 0
        }
      },
    },
    data(){
      return {

      }
    },
    created() {

    },
    methods:{
      toRouterPath(path){
        this.$router.push({
          path: path,
          query: {
            pageNum: 1
          }
        });
      }
    }
  }
</script>

<style lang="scss" scoped>
.panel-group {
  margin-top: 5px;

  .card-panel-col {
    margin-bottom: 10px;
  }

  .card-panel {
    height: 108px;
    cursor: pointer;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    color: #666;
    background: #fff;
    box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
    border-color: rgba(0, 0, 0, .05);

    &:hover {
      .card-panel-icon-wrapper {
        color: #fff;
      }

      .icon-people {
        background: #40c9c6;
      }

      .icon-message {
        background: #36a3f7;
      }

      .icon-money {
        background: #f4516c;
      }

      .icon-shopping {
        background: #34bfa3
      }
      .icon-tree {
        background: #73c0de
      }
      .icon-example {
        background: #91cc75;
      }
      .icon-form {
        background: #fecc66
      }
      .icon-job {
        background: #fd8008
      }

      .icon-danger {
        background: #F56C6C
      }
    }

    .icon-people {
      color: #40c9c6;
    }

    .icon-message {
      color: #36a3f7;
    }

    .icon-money {
      color: #f4516c;
    }

    .icon-shopping {
      color: #34bfa3
    }
   .icon-tree {
      color: #73c0de
    }

    .icon-example {
      color: #91cc75;
    }

    .icon-form {
      color: #fecc66
    }

    .icon-job {
      color: #fd8008
    }
    .icon-danger {
      color: #F56C6C
    }
    .card-panel-icon-wrapper {
      float: left;
      margin: 14px 0 0 14px;
      padding: 16px;
      transition: all 0.38s ease-out;
      border-radius: 6px;
    }

    .card-panel-icon {
      float: left;
      font-size: 48px;
    }

    .card-panel-description {
      float: right;
      font-weight: bold;
      margin: 26px;
      margin-left: 0px;

      .card-panel-text {
        line-height: 18px;
        color: rgba(0, 0, 0, 0.45);
        font-size: 16px;
        margin-bottom: 12px;
      }

      .card-panel-num {
        font-size: 20px;
      }
    }
    .total-text{
      color: rgba(0, 0, 0, 0.45);
      font-size: 16px;
      font-weight: bold;
    }
    .total-value{
      font-size: 22px;
      font-weight: bold;
      color: #666;
    }
  }
}

@media (max-width:550px) {
  .card-panel-description {
    display: none;
  }

  .card-panel-icon-wrapper {
    float: none !important;
    width: 100%;
    height: 100%;
    margin: 0 !important;

    .svg-icon {
      display: block;
      margin: 14px auto !important;
      float: none !important;
    }
  }
}
</style>
